{{define "Submit"}}
	{{template "header.html" .}}

        <!-- Content
        ================================================== -->
        <section id="content">        	
            <div class="container">				
				<div id="mainContent">
					<div id="mainContent_inner">

						<div class="row">
							
					        <!-- left side content
					        ================================================== -->
							<div class="col-xs-8">
								<div class="page-header">
								  <h1>Get Readme</h1>
								</div>
								{{if (and (eq .status 1) (ne .message ""))}}
								<div class="alert alert-info">
									{{.message}}
								</div>
								{{end}}
								{{if (and (eq .status 0) (ne .message ""))}}
								<div class="alert alert-danger">
									{{.message}}
								</div>
								{{end}}
								
								<form method="post" action="/submit" class="form-horizontal">
									<div class="form-group">
										<label for="inputLabel-1" class="col-xs-2 control-label">Readme Url</label>
										<div class="col-xs-10">
											<div class="input-group">
												<input type="text" class="form-control" name="url" value="{{.url}}" />
												<span class="input-group-btn">
													<button class="btn btn-default" type="submit">Get</button>
												</span>
											</div>
										</div>
									</div>
								</form>
								{{if ne .name ""}}
								<div class="page-header">
								  <h1>{{.name}}</h1>
								  {{.description}}
								</div>
								{{end}}
								
								{{if ne .content ""}} 
								<div>
									<pre>{{.content}}</pre>
								</div>
								{{end}}
							</div>
							
					        <!-- Right side content
					        ================================================== -->
							<div class="col-xs-4">
								<aside>
									<div class="asideBox">
										<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
										<!-- domain 300x250 -->
										<ins class="adsbygoogle"
										     style="display:inline-block;width:300px;height:250px"
										     data-ad-client="ca-pub-6199598100770666"
										     data-ad-slot="7377207832"></ins>
										<script>
										(adsbygoogle = window.adsbygoogle || []).push({});
										</script>
									</div>
									<div class="asideBox">
										<h3 class="asideBoxTitle">Recent View</h3>
										<div class="asideBoxContent">
											<ul class="listStyle">
												{{range .recent}}
												<li><a href="/info/{{.Name}}"><span class="glyphicon glyphicon-share-alt"></span> &nbsp;{{.Name}}</a></li>
												{{end}}
											</ul>
										</div>
									</div>
								</aside>
							</div>
						</div>
                	</div>
				</div>
            </div>
        </section>
        
    {{template "footer.html" .}}    
{{end}}